<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>积分详情</title>
<meta name="viewport" content="width=100%, initial-scale=1.0, user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/lib/weix/style/weui.min.css">
<link rel="stylesheet" href="/css/fonts.css">
<link rel="stylesheet" href="/css/comm.css">
<link rel="stylesheet" href="/css/detailed_hej.css">
</head>

<body>
<div class="th-detail__htoux"><span class="tb" style="background-color:#ffbf24"><i class="icon-money"></i></span></div>

<div style="padding-bottom:30px; font-size:48px; text-align:center;" class="J_jif"></div>

<div class="th-details">   
    
    
    <div class="th-detail">
    	<div class="th-detail__zc"><div class="nrt">积分内容</div></div>
        <div class="th-detail__yc" id="J_tit"></div>
    </div>
    
    <div class="th-detail">
    	<div class="th-detail__zc"><div class="nrt">积分类型</div></div>
        <div class="th-detail__yc" id="J_laiy"></div>
    </div>
    
    <div class="th-detail">
    	<div class="th-detail__zc"><div class="nrt">积分时间</div></div>
        <div class="th-detail__yc" id="J_time"></div>
    </div>
    
</div>
<script src="/js/zepto.min.js"></script>
<script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
<script src="/js/comm.js"></script>
<script type="text/javascript">
$(function(){	
	var id = "${id}";
	var data = {id:id};
	var url = "/points/points_detail";
	$.ajax({
		type: "POST",
		dataType: 'json',
		async: false,
		contentType: "application/json; charset=utf-8",
		data: JSON.stringify(data),
		url: url,
		success: function(res){
		  if(res.code == 200){
			//操作
			var datas = res.data;
			
			if(datas.point > 0){
				$('.J_jif').html('+'+datas.point);
			}else{
				$('.J_jif').html(datas.point);
			}
			
			// 来源/0:客户成交/1:发展合伙人/2:推荐成交/3:转发任务/4:兑换产品
			var laiy_data = ''
			if(datas.source == 0){
				laiy_data = '带单成交'
			}else if(datas.source == 1){
				laiy_data = '发展合伙人'
			}else if(datas.source == 2){
				laiy_data = '推荐成交'
			}else if(datas.source == 3){
				laiy_data = '转发任务'
			}else if(datas.source == 4){
				laiy_data = '兑换产品'
			}else{
				laiy_data = '未知来源'
			}
			
			$('#J_laiy').html(laiy_data)
			
			$('#J_time').html(datas.addtime)
			
			$('#J_tit').html(datas.title)
			
			
		  }else{
			weui.topTips(res.msg)
		  }
		},
		error: function(e){
	
		},
		complete: function(e){
		}
	});
});
</script>
</body>
</html>